//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.yang.sofa;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;

public class AsyncInitBeanHolder {
    private static final ConcurrentMap<String, Map<String, String>> asyncBeanInfos = new ConcurrentHashMap();

    public AsyncInitBeanHolder() {
    }

    public static void registerAsyncInitBean(String moduleName, String beanId, String methodName) {
        if (moduleName != null && beanId != null && methodName != null) {
            Map<String, String> asyncBeanInfosInModule = (Map)asyncBeanInfos.get(moduleName);
            if (asyncBeanInfosInModule == null) {
                asyncBeanInfos.putIfAbsent(moduleName, new ConcurrentHashMap());
                asyncBeanInfosInModule = (Map)asyncBeanInfos.get(moduleName);
            }

            asyncBeanInfosInModule.put(beanId, methodName);
        }
    }

    public static String getAsyncInitMethodName(String moduleName, String beanId) {
        Map<String, String> asyncBeanInfosInModule = moduleName == null ? null : (Map)asyncBeanInfos.get(moduleName);
        return beanId != null && asyncBeanInfosInModule != null ? (String)asyncBeanInfosInModule.get(beanId) : null;
    }
}
